package com.practice.java8.lambdaexpression;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class SortMain {

	public static void main(String[] args) {

		List<String> names = Arrays.asList("Peter", "Anna", "Mike", "Xenia");

		Collections.sort(names, (String a, String b) -> {
			return b.compareTo(a);
		});
		Collections.sort(names, (String a, String b) -> b.compareTo(a));
		Collections.sort(names, (a, b) -> b.compareTo(a));
	}

}
